package com.qf.team2.netdisc.common.pojo.qo;

import java.sql.Timestamp;
import java.util.Objects;

/**分享详情参数实体
 * @author hanch
 * @since 2021.05.26
 */
public class LinksDetails {
    /**
     * 链接分享的时间
     */
    private Timestamp createTime;
    /**
     *链接的时效
     */
    private long deadline;
    /**
     * 提取码
     */
    private String verifyCode;
    /**
     * 链接
     */
    private String link;
    /**
     * 文件名
     */
    private  String docName;

    /**
     * 链接ID
     */
    private Integer linkId;

    public LinksDetails() {
    }

    public LinksDetails(Timestamp createTime, long deadline, String verifyCode, String link, String docName, Integer linkId) {
        this.createTime = createTime;
        this.deadline = deadline;
        this.verifyCode = verifyCode;
        this.link = link;
        this.docName = docName;
        this.linkId = linkId;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }

    public long getDeadline() {
        return deadline;
    }

    public void setDeadline(long deadline) {
        this.deadline = deadline;
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public String getDocName() {
        return docName;
    }

    public void setDocName(String docName) {
        this.docName = docName;
    }

    public Integer getLinkId() {
        return linkId;
    }

    public void setLinkId(Integer linkId) {
        this.linkId = linkId;
    }

    @Override
    public String toString() {
        return "LinksDetails{" +
                "createTime=" + createTime +
                ", deadline=" + deadline +
                ", verifyCode='" + verifyCode + '\'' +
                ", link='" + link + '\'' +
                ", docName='" + docName + '\'' +
                ", linkId=" + linkId +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LinksDetails that = (LinksDetails) o;
        return deadline == that.deadline && Objects.equals(createTime, that.createTime) && Objects.equals(verifyCode, that.verifyCode) && Objects.equals(link, that.link) && Objects.equals(docName, that.docName) && Objects.equals(linkId, that.linkId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(createTime, deadline, verifyCode, link, docName, linkId);
    }
}
